Skip to content

Conversation

@penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Nov 5, 2025

This is essentially the same PR as #1087, copy pasted but just with a different name (AbstractMCMC.to_samples instead of DynamicPPL.from_chains, and AbstractMCMC.from_samples instead of DynamicPPL.to_chains).

This follows on from TuringLang/AbstractMCMC.jl#184.

Since #1087 was already reviewed and discussed quite extensively, and this is completely the same code, I will probably merge this once CI passes.

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 96.15385% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.50%. Comparing base (ab6f38a) to head (6117826).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/chains.jl 92.59% 2 Missing ⚠️
ext/DynamicPPLMCMCChainsExt.jl 98.03% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1112      +/-   ##
==========================================
+ Coverage   81.23%   81.50%   +0.26%     
==========================================
  Files          40       40              
  Lines        3805     3844      +39     
==========================================
+ Hits         3091     3133      +42     
+ Misses        714      711       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Benchmark Report for Commit 6117826

Computer Information

Julia Version 1.11.7
Commit f2b3dbda30a (2025-09-08 12:10 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Benchmark Results

┌───────────────────────┬───────┬─────────────┬───────────────────┬────────┬────────────────┬─────────────────┐
│                 Model │   Dim │  AD Backend │           VarInfo │ Linked │ t(eval)/t(ref) │ t(grad)/t(eval) │
├───────────────────────┼───────┼─────────────┼───────────────────┼────────┼────────────────┼─────────────────┤
│ Simple assume observe │     1 │ forwarddiff │             typed │  false │            6.4 │             1.9 │
│           Smorgasbord │   201 │ forwarddiff │             typed │  false │          744.9 │            42.1 │
│           Smorgasbord │   201 │ forwarddiff │ simple_namedtuple │   true │          432.1 │            54.0 │
│           Smorgasbord │   201 │ forwarddiff │           untyped │   true │          812.0 │            35.6 │
│           Smorgasbord │   201 │ forwarddiff │       simple_dict │   true │         6923.1 │            29.6 │
│           Smorgasbord │   201 │ forwarddiff │      typed_vector │   true │          772.9 │            40.7 │
│           Smorgasbord │   201 │ forwarddiff │    untyped_vector │   true │          818.4 │            35.4 │
│           Smorgasbord │   201 │ reversediff │             typed │   true │          943.7 │            44.7 │
│           Smorgasbord │   201 │    mooncake │             typed │   true │          756.3 │             5.8 │
│           Smorgasbord │   201 │      enzyme │             typed │   true │          945.9 │             3.7 │
│    Loop univariate 1k │  1000 │    mooncake │             typed │   true │         4009.9 │             5.9 │
│       Multivariate 1k │  1000 │    mooncake │             typed │   true │         1032.5 │             9.0 │
│   Loop univariate 10k │ 10000 │    mooncake │             typed │   true │        44158.8 │             5.3 │
│      Multivariate 10k │ 10000 │    mooncake │             typed │   true │         8716.6 │            10.3 │
│               Dynamic │    10 │    mooncake │             typed │   true │          126.2 │            12.1 │
│              Submodel │     1 │    mooncake │             typed │   true │            9.3 │             6.3 │
│                   LDA │    12 │ reversediff │             typed │   true │         1043.2 │             2.0 │
└───────────────────────┴───────┴─────────────┴───────────────────┴────────┴────────────────┴─────────────────┘

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

DynamicPPL.jl documentation for PR #1112 is available at:
https://TuringLang.github.io/DynamicPPL.jl/previews/PR1112/

@penelopeysm penelopeysm merged commit 6532d96 into main Nov 5, 2025
19 checks passed
@penelopeysm penelopeysm deleted the py/tofromsamples2 branch November 5, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants